﻿namespace BloggerBackup
{
    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;

    public class TextboxCueSmartTagActionList : DesignerActionList
    {
        private TextboxCue _TextboxCue;
        private DesignerActionUIService designerActionUISvc;

        public TextboxCueSmartTagActionList(IComponent component) : base(component)
        {
            this._TextboxCue = (TextboxCue) component;
            this.designerActionUISvc = (DesignerActionUIService) this.GetService(typeof(DesignerActionUIService));
        }

        private PropertyDescriptor GetPropertyByName(string propName)
        {
            PropertyDescriptor descriptor2 = TypeDescriptor.GetProperties(this._TextboxCue)[propName];
            if (descriptor2 == null)
            {
                throw new ArgumentException("Matching property not found!", propName);
            }
            return descriptor2;
        }

        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection items2 = new DesignerActionItemCollection();
            items2.Add(new DesignerActionPropertyItem("TextPrompt", "Text Prompt", "", "Sets the Prompt or Cue text to display when the control is empty."));
            return items2;
        }

        public string TextPrompt
        {
            get
            {
                return this._TextboxCue.TextPrompt;
            }
            set
            {
                this.GetPropertyByName("TextPrompt").SetValue(this._TextboxCue, value);
            }
        }
    }
}

